'\" t
.\"     Title: bugle-contextattribs
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\"      Date: June 2012
.\"    Manual: Bugle user manual
.\"    Source: BUGLE 0.0.20150628
.\"  Language: English
.\"
.TH "BUGLE\-CONTEXTATTRIB" "7" "June 2012" "BUGLE 0.0.20150628" "Bugle user manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
bugle-contextattribs \- override attributes during context creation
.SH "SYNOPSIS"
.sp
.nf
filterset contextattribs
{
    major 3
    minor 3
    flag "debug"
    flag "robust"
    profile "core"
    profile "!compatibility"
}
.fi
.SH "DESCRIPTION"
.PP
The GLX_ARB_context_create and GLX_ARB_context_create_profile extensions allow applications extra control over how contexts are created\&. Applications can specify a GL version, select flags that modify the operation of the context, or specify which GL profiles they wish to use\&.
.PP
The
contextattribs
filter\-set allows these attributes to be overridden on an existing application\&. There are a number of reasons this might be desirable:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the application is using a framework that does not allow these attributes to be specified, this may be the easiest way to do so\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Forcing the core profile can be used to identify areas of the application that rely on the compatibility profile\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Forcing a debug context will allow the
\fBbugle-logdebug\fR(7)
filter\-set to record debugging information from the driver\&.
.RE
.PP
The interface provided is fairly low\-level\&. The major version, the minor version, and each bit in the flags and the profile mask can be either left alone or set to a specific value\&. There are no checks that the requested combination makes sense e\&.g\&., versions of GL before 3\&.2 did not have profiles\&.
.SH "OPTIONS"
.PP
\fBmajor\fR
.RS 4
Specifies a value for
GLX_CONTEXT_MAJOR_VERSION_ARB\&.
.RE
.PP
\fBminor\fR
.RS 4
Specifies a value for
GLX_CONTEXT_MINOR_VERSION_ARB\&.
.RE
.PP
\fBflag\fR
.RS 4
Specifies a flag to be added or removed from
GLX_CONTEXT_FLAGS_ARB\&. The available flags are
debug,
forward
and
robust\&. By default a flag is added to the flag mask, but if preceeded by a
!
it is removed\&.
.sp
This option may be given multiple times to override multiple flags\&. Specifying that a flag should be both added and removed has undefined results\&.
.RE
.PP
\fBprofile\fR
.RS 4
This option works similarly to
\fBflag\fR
except that it affects
GLX_CONTEXT_PROFILE_MASK_ARB\&. The available profiles are
core,
compatibility
and
es2\&.
.sp
Note that because this is a mask, the correct way to force core profile is to specify both
core
and
!compatibility\&.
.RE
.SH "LIMITATION"
.PP
This filter\-set is currently only implemented for GLX\&.
.SH "AUTHOR"
.PP
bugle
is written and maintained by
Bruce Merry\&.
.SH "SEE ALSO"
.PP
\fBbugle\fR(3),
\fBbugle-logdebug\fR(7)
